<?php
// No direct access.
defined('_JEXEC') or die;

require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
if ( $detect->isMobile() ) {
    include('index_mobile.php');
    return;
}

$pageoption = JRequest::getVar('option');
$pageview = JRequest::getVar('view');
$Itemid = JRequest::getVar('Itemid');
//$isHome = ($pageoption == 'com_content' and $pageview == 'featured');
//$isArticle = ($pageopion == 'com_content' and $pageview == 'article');
$layout=JRequest::getVar('layout');
$error=JRequest::getVar('error');
//$show_login=JRequest::getVar('show_login');
$tmplpath = $this->baseurl.'/templates/'.$this->template;
$user=JFactory::getUser();
// get params
$doc=JFactory::getDocument();
//$meta = $document->getMetaData('description');
//if($meta!="")
//$document->setTitle($meta);
	unset($this->_scripts[JURI::root(true).'/media/system/js/core.js']);
	unset($this->_scripts[JURI::root(true).'/media/system/js/caption.js']);
	$this->_script['text/javascript'] = preg_replace('%window\.addEvent\(\'load\',\s*function\(\)\s*{\s*new\s*JCaption\(\'img.caption\'\);\s*}\);\s*%', '', $this->_script['text/javascript']);
?>
<!DOCTYPE html>
<!--[if lt IE 7]>	  <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>		 <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>		 <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
	<head>
		<jdoc:include type="head" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="author" content="Duc Hong">
<meta name="viewport" content="width=device-width">
<meta name="google-site-verification" content="25QaQKld5FqfyNqMARRfrFPtUsgluznG4BsCq79Qm9c" />
<link rel="shortcut icon" href="<?php echo $tmplpath; ?>/src/images/icon.ico" />
<link rel="stylesheet" href="<?php echo $tmplpath; ?>/src/css/style.css">
<link rel="stylesheet" href="<?php echo $tmplpath; ?>/src/css/reveal.css">
<!--link href="<?php echo $tmplpath; ?>/src/css/jquery.datepick.css" rel="stylesheet" type="text/css" /-->

<!--[if lt IE 9]>
	<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<?php
	//require_once('_favicon.php');
	//require_once('_ie.php');
?>
<!--[if gte IE 9]>
<style type="text/css">
.gradient {
	filter: none;
}
</style>
<![endif]-->

<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/jquery.min.js"></script>

<script src="<?php echo $tmplpath; ?>/src/js/modernizr-2.6.2-respond-1.1.0.min.js"></script>
<script src="http://cdn.optimizely.com/js/1018520877.js"></script>
	</head>
	<body>
		<!--[if lt IE 7]>
			<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
		<![endif]-->

		<div class="max-container" id="max-top">
	<div class="wrapper">
		<header class="header clearfix">
			<h2 id="logo"><a href="<?php JURI::root()?>">Fitplan</a></h2>
			<?php if($user->id):?>
			<div class="Logined">
				<div class="Logined-l"></div>
				<div class="Logined-m">
					<ul>
						<li>Velkommen <?php echo $user->name?></li>
						<li><a href="index.php?option=com_users&task=user.logout">Log ud</a></li>
					</ul>
				</div>
				<div class="Logined-r"></div>
			</div>
			<?php if($user->groups[5]==5){?>
				<a class="btnMyuser" href="<?php echo JURI::base()?>/index.php?option=com_users&view=profile&layout=mycarlendar&id=<?php echo $user->id;?>">SE MIN KALENDER</a>
			<?php }?>
			<?php else:?>
			<div class="noLogin">
				<img src="<?php echo $tmplpath; ?>/img/imgText1.png" alt="imgText1.png" id="text-log">
				<div id="login-wrapper">
					<a data-reveal-id="f-login" id="btnLogin">Login</a>
				</div>
			</div>
			<?php endif;?>

			<jdoc:include type="modules" name="login" />

		</header>
	</div>
</div>
<div class="max-container" id="max-nav">
	<div class="wrapper">
		<nav id="main-nav-wrapper" class="clearfix">
			<jdoc:include type="modules" name="user-menu" />
			<div class="clr"></div>
		</nav>
	</div>
</div>

		<div class="max-container max-body" id="max-body">
			
			<?php  if(JRequest::getVar('view')=="featured"):?>
<div id="CookieInfo" class="CookieInfo"<?php echo empty($_COOKIE["first"]) ? '' : ' style="display: none;"'?>>
	<div class="cookie-content clearfix">
<?php
$a =JTable::getInstance('content');
$a->load(19);
echo $a->get('introtext');
?>
	<a class="bt-close-cookie" href="#">Luk</a>
	</div>
	<!--Cookie-content--> 
</div>

<script type="text/javascript">
	jQuery(document).ready(function(){
			$(".bt-close-cookie").click(function(event) {
					$(".CookieInfo").hide('slow/400/fast', function() {

						});
				});
		});
</script>
			<?php endif;?>
			
<?php 
	if(!isset($_COOKIE["first"]))
		setcookie("first", '1', time()+3600);
?>
<div style="display:none">
	<jdoc:include type="message" />
</div>
			<jdoc:include type="component" />
		</div>
		
			<div class="max-container" id="max-footer">
	<div class="wrapper">
		<footer class="footer clearfix">
			<div class="footer-top col-wrapper clearfix">
				<div class="col-2 mt10 col-cfg">
					<div class="f-news">
<jdoc:include type="modules" name="foot-col1" />
</div>
<div class="mt10  f-menu-right">
<jdoc:include type="modules" name="foot-col2" />
</div>
					<div class="clr"></div>
				</div>
				<div class="col-1 mt20 col-cfg">
					<h2>Tilmeld Nyhedsbrev</h2>
					<div class="b-newsletter">
					    <jdoc:include type="modules" name="newletter" />
					</div>
				</div>
				<div class="col-1 mt20 col-cfg col-last ">
				 <jdoc:include type="modules" name="foot-col3" />
				</div>
			</div>
			<div class="footer-end clearfix">
				<p>&copy; 2013 Fitplan. All rights reserved.</p>
				<a href="http://www.mywebcreations.dk" id="mwc">Design af My Web Creations</a>
			</div>

		</footer>
	</div>
</div>


<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/jquery-migrate-1.2.1.min.js"></script>
<!--script src="<?php echo $tmplpath; ?>/src/js/jquery.datepick.js" type="text/javascript"></script-->
<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/jquery.easing.js"></script>
<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/jquery.cycle2.min.js"></script>
<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/jquery.reveal.js"></script>
<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/jquery.roundabout.min.js"></script>


<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/jquery.inputToggle.min.js"></script>
<script type="text/javascript" src="<?php echo $tmplpath; ?>/src/js/init.js"></script>
<script type="text/javascript">
	(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
				(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
		})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

	ga('create', 'UA-54224071-1', 'auto');
	ga('send', 'pageview');
</script><!---27/08/2014 4:31 PM-->

<script type="text/javascript">
  jQuery(function(){
  /* Hide form input values on focus*/

	 
	  jQuery('input:text, input:password').each(function(){
	  var txtval = jQuery(this).val();
	  jQuery(this).focus(function(){
		  if(jQuery(this).val() == txtval){
			  jQuery(this).val('')
		  }
	  });
	  jQuery(this).blur(function(){
		  if(jQuery(this).val() == ""){
			  jQuery(this).val(txtval);
		  }
	  });
  });

  $("#choicemaker").change(function() {
		var count= parseInt($(this).val());
		for(i=1;i<=4;i++)
			$('#nam'+i+'').hide();	
		for(i=1;i<=count;i++)
		 $('#nam'+i+'').show();	
	});
  $("#close_meeting").click(function() {
	  $("#f-event3").hide();
	});
  
});
</script>

<script type="text/javascript">
	$(document).ready(function(){ 
		
		//$('#date_meeting').datepick();
		
		$("input:radio[name='group1']").click(function() {	  
	$('.desc').hide();
	$('#' + $("input:radio[name='group1']:checked").val()).show();
	});
});
</script>
<?php if(isset($_GET['error'])){?>
  <script>
    $('#btnLogin').click();
  </script>
<?php }?>

<script type="text/javascript">
setTimeout(function(){var a=document.createElement("script");
var b=document.getElementsByTagName("script")[0];
a.src=document.location.protocol+"//dnn506yrbagrg.cloudfront.net/pages/scripts/0018/6807.js?"+Math.floor(new Date().getTime()/3600000);
a.async=true;a.type="text/javascript";b.parentNode.insertBefore(a,b)}, 1);
</script>

<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 982967144;
var google_custom_params = window.google_tag_params;
var google_remarketing_only = true;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//googleads.g.doubleclick.net/pagead/viewthroughconversion/982967144/?value=0&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

<script type="text/javascript">(function() {
  var _fbq = window._fbq || (window._fbq = []);
  if (!_fbq.loaded) {
    var fbds = document.createElement('script');
    fbds.async = true;
    fbds.src = '//connect.facebook.net/en_US/fbds.js';
    var s = document.getElementsByTagName('script')[0];
    s.parentNode.insertBefore(fbds, s);
    _fbq.loaded = true;
  }
  _fbq.push(['addPixelId', '1549951601886203']);
})();
window._fbq = window._fbq || [];
window._fbq.push(['track', 'PixelInitialized', {}]);
</script>
<noscript><img height="1" width="1" alt="" style="display:none" src="https://www.facebook.com/tr?id=1549951601886203&amp;ev=PixelInitialized" /></noscript>

	</body>
</html>